<?php


namespace Demo\FactoryFunc;


class FileLogger implements Logger
{
    private  $filePath;

    public function __construct(string $filePath)
    {
        $this->filePath = $filePath;
    }

    public function log(string $message)
    {
        echo "file".$message.PHP_EOL;
        echo $this->filePath.PHP_EOL;
//        file_put_contents($this->filePath, $message . PHP_EOL, FILE_APPEND);
    }
}